<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>xmpp.client.Component</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="xmpp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="xmpp-module.html">Package&nbsp;xmpp</a> ::
        <a href="xmpp.client-module.html">Module&nbsp;client</a> ::
        Class&nbsp;Component
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="xmpp.client.Component-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Component</h1><span class="codelink"><a href="xmpp.client-pysrc.html#Component">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
<a href="xmpp.client.CommonClient-class.html">CommonClient</a> --+
               |
              <strong class="uidshort">Component</strong>
</pre>

<hr />
Component class. The only difference from CommonClient is ability to 
  perform component authentication.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="xmpp.client.Component-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">server</span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">5347</span>,
        <span class="summary-sig-arg">typ</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">debug</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">always</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">nodebuilder</code><code class="variable-quote">'</code><code class="variable-group">]</code></span>,
        <span class="summary-sig-arg">domains</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">sasl</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">bind</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">route</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">xcp</span>=<span class="summary-sig-default">0</span>)</span><br />
      Init function for Components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.client-pysrc.html#Component.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="xmpp.client.Component-class.html#connect" class="summary-sig-name">connect</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">server</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">proxy</span>=<span class="summary-sig-default">None</span>)</span><br />
      This will connect to the server, and if the features tag is found 
      then set the namespace to be jabber:client as that is required for 
      jabberd2.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.client-pysrc.html#Component.connect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dobind"></a><span class="summary-sig-name">dobind</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sasl</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.client-pysrc.html#Component.dobind">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="auth"></a><span class="summary-sig-name">auth</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">password</span>,
        <span class="summary-sig-arg">dup</span>=<span class="summary-sig-default">None</span>)</span><br />
      Authenticate component &quot;name&quot; with password 
      &quot;password&quot;.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.client-pysrc.html#Component.auth">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="xmpp.client.CommonClient-class.html">CommonClient</a></code></b>:
      <code><a href="xmpp.client.CommonClient-class.html#DisconnectHandler">DisconnectHandler</a></code>,
      <code><a href="xmpp.client.CommonClient-class.html#RegisterDisconnectHandler">RegisterDisconnectHandler</a></code>,
      <code><a href="xmpp.client.CommonClient-class.html#UnregisterDisconnectHandler">UnregisterDisconnectHandler</a></code>,
      <code><a href="xmpp.client.CommonClient-class.html#disconnected">disconnected</a></code>,
      <code><a href="xmpp.client.CommonClient-class.html#event">event</a></code>,
      <code><a href="xmpp.client.CommonClient-class.html#isConnected">isConnected</a></code>,
      <code><a href="xmpp.client.CommonClient-class.html#reconnectAndReauth">reconnectAndReauth</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">server</span>,
        <span class="sig-arg">port</span>=<span class="sig-default">5347</span>,
        <span class="sig-arg">typ</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">debug</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">always</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">nodebuilder</code><code class="variable-quote">'</code><code class="variable-group">]</code></span>,
        <span class="sig-arg">domains</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">sasl</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">bind</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">route</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">xcp</span>=<span class="sig-default">0</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="xmpp.client-pysrc.html#Component.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Init function for Components. As components use a different auth 
  mechanism which includes the namespace of the component. Jabberd1.4 and 
  Ejabberd use the default namespace then for all client messages. Jabberd2
  uses jabber:client. 'server' argument is a server name that you are 
  connecting to (f.e. &quot;localhost&quot;). 'port' can be specified if 
  'server' resolves to correct IP. If it is not then you'll need to specify
  IP and port while calling &quot;connect()&quot;.
  <dl class="fields">
    <dt>Overrides:
      <a href="xmpp.client.CommonClient-class.html#__init__">CommonClient.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="connect"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">connect</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">server</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">proxy</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="xmpp.client-pysrc.html#Component.connect">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  This will connect to the server, and if the features tag is found then
  set the namespace to be jabber:client as that is required for jabberd2. 
  'server' and 'proxy' arguments have the same meaning as in 
  xmpp.Client.connect()
  <dl class="fields">
    <dt>Overrides:
      <a href="xmpp.client.CommonClient-class.html#connect">CommonClient.connect</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="xmpp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Sat Dec 15 22:25:14 2007
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
